<template>
<div id="newvideo1">
        <ul>
            <li v-for="n in videolist" :key="n.id">
                <video :src="n.video.url" class="video" controls></video>
                <div class="user">
                    <!-- 用户信息 -->
                    <div class="left">
                        <span><img :src="n.user.avatarurl"></span>
                        <span class="text">{{n.user.nickName}}</span>
                    </div>
                    <div class="right">
                        <van-row type="flex" justify="space-around">
                        <van-col span="9"><van-icon name="good-job-o" />{{n.upCount}}</van-col>
                        <van-col span="6"><van-icon name="chat-o" />{{n.commentCount}}</van-col>
                        <van-col span="3"><van-icon name="share-o" /></van-col>
                        </van-row>
                    </div>
                </div>
            </li>
        </ul>
  </div>
</template>

<script>
export default {
    name:'newvideo3',
    data(){
        return {
            videolist:[],
        }
    },
    created(){
        this.getlist()
    },
    methods:{
        getlist(){
            this.axios
            .get(`video/1331498`)
            .then(value=>{
                this.videolist=value.feeds
            })
        },
    },
}
</script>

<style scoped>
*{
    padding: 0;
    margin: 0;
}
h1{
    width: 100%;
    text-align: center;
    height: 50px;
    font-size: 20px;
    line-height: 50px;
    background-color: rgb(235, 56, 56);
    color: white;
    font-weight: 500;
}
.topright{
    position: absolute;
    font-size: 30px;
    right: 0;
    top: 12px;
}
.van-tabs{
    margin-top:8px;
}
.video{
    width: 100%;
    height: 200px;
    margin: 10px 0;
    margin-top:20px;
    border-top: 2px solid rgb(3, 0, 0);
    border-bottom: 2px solid rgb(4, 0, 0);
}
.left{
        clear: both;
        float: left;
        width: 30%;
        height: 2rem;
        line-height: 2rem;
        padding: 0 10px;
        position: relative;
}
.left img{
        border-radius: 50%;
        width: 30px;
        margin-left: -5px;
        border:1px solid white
}
.text{
    position: absolute;
}
.right{
    width: 50%;
    float: right;
    height: 2rem;
    line-height: 2rem;
}
.van-icon{
    font-size: 2rem;
}
</style>